<template>
    <h2>app</h2> 
    <button @click="showren">测试</button>
    <!-- 用于获取组件的实例对象 -->
    <Person ref="ren"/>
   
</template>

<script lang="ts" setup>
import Person from './components/Preson.vue'
import { ref } from 'vue';

let ren = ref()

function showren() {
    console.log(ren.value);
}

</script>

<style scoped>
.box{
    background-color: aqua;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
}
</style>